/*************************************************************************
	> File Name: oj-213_score_grades_count.c
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年10月27日 星期二 01时45分15秒
 ************************************************************************/

#include <stdio.h>
void swap(int *a, int *b) {
    int t = *a;
    *a = *b;
    *b = t;
}

void sort(int *a, int len) {
    for (int i = 0; i < len; ++i) {
        for (int j = i - 1; j >= 0;--j) {
            if (a[j] < a[j + 1])\
            swap(&a[j], &a[j + 1]);
            else break;
        }
    }
}

void classify(int *b, int score) {
    if (score < 60) b[6]++;
    else if (score < 70) b[5]++;
    else if (score < 80) b[4]++;
    else if (score < 90) b[3]++;
    else if (score < 100) b[2]++;
    else b[1]++;
}

int main() {
    int a[30] = {0}, b[7] = {0}, n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d", &a[i]);
        classify(b, a[i]);
    }
    sort(a, n);
    for (int i = 0 ; i < n; ++i) {
        printf("%d\n", a[i]);
    }
    for (int i = 1; i < 7; ++i) {
        if (i > 1) printf(" ");
        printf("%d", b[i]);
    }
    return 0;
}
